//
//  HZJNormalCell.swift
//  WeiBo
//
//  Created by 陈贵 on 15/9/15.
//  Copyright © 2015年 hzj. All rights reserved.
//

import UIKit

class HZJNormalCell: HZJCell {

    override func setUI() {
        super.setUI()
        
        //图片
        pictureView.translatesAutoresizingMaskIntoConstraints = false
        addConstraint(NSLayoutConstraint(item: pictureView, attribute: NSLayoutAttribute.Top, relatedBy: NSLayoutRelation.Equal, toItem: textView, attribute: NSLayoutAttribute.Bottom, multiplier: 1, constant: 0))
        pictureTop = constraints.last
        
        addConstraint(NSLayoutConstraint(item: pictureView, attribute: NSLayoutAttribute.Left, relatedBy: NSLayoutRelation.Equal, toItem: textView, attribute: NSLayoutAttribute.Left, multiplier: 1, constant: 0))
        addConstraint(NSLayoutConstraint(item: pictureView, attribute: NSLayoutAttribute.Width, relatedBy: NSLayoutRelation.Equal, toItem: nil, attribute: NSLayoutAttribute.NotAnAttribute, multiplier: 1, constant: 2 * HZJPICTURESIZE))
        PictureWidth = constraints.last
        
        addConstraint(NSLayoutConstraint(item: pictureView, attribute: NSLayoutAttribute.Height, relatedBy: NSLayoutRelation.Equal, toItem: nil, attribute: NSLayoutAttribute.NotAnAttribute, multiplier: 1, constant: HZJPICTURESIZE))
        PictureHeight = constraints.last

    }

}
